package com.tsing.basic.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tsing.basic.entity.User;
import com.tsing.basic.vo.req.*;
import com.tsing.basic.vo.resp.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author TheTsing
 * @since 2021-03-29
 */
public interface IUserService extends IService<User> {

    UserLoginRespVo login(UserLoginReqVo reqVo);

    void logout(HttpServletRequest request);

    void addUser(UserAddReqVo reqVo);

    void deleteUser(IdsReqVo reqVo);

    UserRespVo getUserById(IdReqVo reqVo);

    void updateUser(UserUpdateReqVo reqVo);

    void initUserPw(HttpServletRequest request);

    String passwordVerify(HttpServletRequest request, PasswordVerifyReqVo reqVo);

    void updatePassword(HttpServletRequest request, UpdatePasswordReqVo reqVo);

    Page<UserRespVo> userPage(UserPageReqVo reqVo);

    List<RoleRespVo> getRoleById(IdReqVo reqVo);

    List<RoleRespVo> getRoleList();

    void bindRole(BindRoleReqVo reqVo);

    List<HouseTreeRespVo> getHouseTree();

    List<CarportTreeRespVo> getCarportTree();

    IdAndTokenRespVo miniLogin(CodeReqVo reqVo);

    IdAndTokenRespVo miniPhoneLogin(MiniPhoneLoginReqVo reqVo);
}
